home *** CD-ROM | disk | FTP | other *** search
/ Black Crawling Systems Archive Release 1.0 / Black Crawling Systems Archive Release 1.0 (L0pht Heavy Industries, Inc.)(1997).ISO / cdc / cdc014.txt < prev    next >
Text File  |  1994-12-27  |  19KB  |  490 lines

  1. _______________________________________________________________________________
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3.        _   _                                             _   _
  4.       ((___))                                           ((___))
  5.       [ x x ]          cDc communications, inc.         [ x x ]
  6.        \   /                 presents...                 \   /
  7.        (` ')                                             (` ')
  8.         (U)                                               (U)
  9.  
  10.                      Gibe's UNIX COMMAND Bible
  11.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  12.         The latest file from the Cow's Information Series,
  13.         Franken's UNIX Command Bible is suitable for the UNIX
  14.         dilettante, as well as for the hardcore hack. Provides
  15.         easy reference for those hard-to-remember commands.
  16.             Attractive print-out fits well in any decor.
  17.  
  18.  
  19.             Edited by High Priest and Scribe, F. Gibe
  20.  
  21.        "Smash the State! Have a Nice Day!" ........  1987
  22.  
  23. _______________________________________________________________________________
  24. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  25.  
  26.       Command                           Description
  27.       ~~~~~~~                           ~~~~~~~~~~~
  28.  
  29.         awk             Search for a pattern within a file. Includes
  30.                         a built-in programming language.
  31.  
  32.        bdiff            Compares two large files.
  33.  
  34.         bfs             Scans a large file.
  35.  
  36.         cal             Displays a calendar.
  37.  
  38.         cat             Concatenates and prints files.
  39.  
  40.         cc              C  compiler.
  41.  
  42.         cd              Change directory.
  43.  
  44.       chgrp             Changes a file's group ownership.
  45.  
  46.       chmod             Changes a file's access permissions.
  47.  
  48.       chown             Changes the individual ownership of a file.
  49.  
  50.        cmp              Compares two files; diplays the location (line
  51.                         and byte) of the 1st difference between these.
  52.  
  53.       comm              Compares two files so as to determine which
  54.                         lines are common to both.
  55.  
  56.        cp               Copies a file to another location.
  57.  
  58.        cu               Calls another UNIX system.
  59.  
  60.       date              Returns the date and time.
  61.  
  62.        df               Displays free space in the file system.
  63.  
  64.       diff              Displays the differences between two files
  65.                         or directories.
  66.  
  67.       diff3             Displays the differences between three files
  68.                         or directories.
  69.  
  70.        du               Reports on file system usage.
  71.  
  72.       echo              Displays its argument.
  73.  
  74.        ed               Text editor.
  75.  
  76.        ex               Text editor.
  77.  
  78.       expr              Evaluates its argument which is generally
  79.                         a mathematical formula.
  80.  
  81.        f77              FORTRAN compiler.
  82.  
  83.       find              Locates the files w/ specified characteristics.
  84.  
  85.       format            Initializes a floppy disk.
  86.  
  87.       grep              Searches for a pattern within a file. (see awk)
  88.  
  89.       help              Salvation.
  90.  
  91.       kill              Ends a process.
  92.  
  93.        ln               Used to link files.
  94.  
  95.        lpr              Copies the file to the line printer.
  96.  
  97.        ls               Displays info. about one or more files.
  98.  
  99.        mail             Used to receive or deliver e-mail.
  100.  
  101.       mkdir             Creates a new directory.
  102.  
  103.        more             Displays a long file so that the user
  104.                         can scroll through it.
  105.  
  106.         mv              Used to move or rename files.
  107.  
  108.         nroff           Used to format text.
  109.  
  110.         ps              Display a process's status.
  111.  
  112.         pwd             Display the name of the working directory.
  113.  
  114.         rm              Removes one or more files.
  115.  
  116.         rmdir           Deletes one or more directories.
  117.  
  118.         sleep           Causes a process to become inactive for a
  119.                         specified length of time.
  120.  
  121.         sort            Sort and merge one or more files.
  122.  
  123.         spell           Finds spelling errors in a file.
  124.  
  125.         split           Divides a file.
  126.  
  127.         stty            Display or set terminal parameters.
  128.  
  129.         tail            Displays the end of a file.
  130.  
  131.         troff           Outputs formatted output to a typesetter.
  132.  
  133.         tset            Sets the terminal type.
  134.  
  135.         umask           Allows the user to specify a new creation
  136.                         mask. 
  137.  
  138.         uniq            Compares 2 files. Finds and displays lines
  139.                         in one file that are unique.
  140.  
  141.         uucp            UNIX-to-UNIX execute.
  142.  
  143.          vi             Full screen editor.
  144.  
  145.          wc             Displays details in the file size.
  146.  
  147.         who             Info. on who else be online.
  148.  
  149.         write           Used to send a message to another user.
  150. _______________________________________________________________________________
  151. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  152.   That's the Summary. Now print it out, if you'd like. Good for fast
  153.   referencing. Following the Summary is a more in-depth look at each 
  154.              of the commands already listed.
  155. _______________________________________________________________________________
  156. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  157.  
  158.    awk program filenames
  159.    awk -f programfilenames filenames
  160.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  161.    The [awk] utility can be used to find any lines in a file which 
  162.    match a certain pattern; once found, these lines can be processed.
  163.    In the first configuration, the program that [awk] is to
  164.    execute is specified in the command line. In the second,
  165.    the program is stored as the file given in programfilename.
  166.    The -f option instructs [awk] to read this file.
  167.  
  168.  
  169.    [bdiff] is used to compare files too large for [diff]. See
  170.    [diff] for the format.
  171.  
  172.  
  173.    bfs filename
  174.    ~~~~~~~~~~~~
  175.    [bfs] is used to scan a large file to determine where to split
  176.    it into smaller files.
  177.  
  178.  
  179.    cal 01-12 (month) 0-9999 (year)
  180.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  181.    [cal] utility can be used to display a calendar of any year
  182.    from 0 to 9999 AD, and any or all of the twelve months.
  183.  
  184.  
  185.    cat filename
  186.    ~~~~~~~~~~~~
  187.    [cat] can be used to examine a short file. See [more] for 
  188.    lengthier files.
  189.  
  190.  
  191.    number[cc]
  192.    ~~~~~~~~~~
  193.    The [cc] command changes the entire current line, or a group
  194.    of lines starting with the current line. [number] represents
  195.    the number of old lines to be deleted.
  196.  
  197.  
  198.    cd directory name
  199.    ~~~~~~~~~~~~~~~~~
  200.    The [cd] command causes the current working directory to be
  201.    changed. The [directory name] can be either a full or partial
  202.    path name.
  203.  
  204.  
  205.    chgrp groupname filename
  206.    ~~~~~~~~~~~~~~~~~~~~~~~~
  207.    This command changes the group ownership of a file.
  208.  
  209.  
  210.    chmod {ugoa} {+-} {rwx}
  211.    ~~~~~~~~~~~~~~~~~~~~~~~
  212.    The [chmod] utility changes a file's access permissions. [u]
  213.    specifies the user or owner's login name, [g] specifies a group
  214.    and [o] indicates all others. [a] indicates the user, group,
  215.    and all others; c'est the default. [+] adds permission; [-]
  216.    deletes it. [r] indicates read, [w] write, and [x] execute.
  217.  
  218.  
  219.    chown individualname filename
  220.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  221.    [chown] changes the individual ownership of a file (see chgrp).
  222.  
  223.  
  224.    cmp filename1 filename2
  225.    ~~~~~~~~~~~~~~~~~~~~~~~
  226.    [cmp] is one of the four principle UNIX file comparison utilities.
  227.    It compares 2 files, and returns the positions where they differ.
  228.  
  229.  
  230.    comm -options filename1 filename2
  231.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  232.    The [comm] utility, in comparing two files, produces three
  233.    columns of output. The first contains lines unique to the
  234.    first file, the second, lines unique to the second, and the
  235.    third column, lines common to both files. By placing the
  236.    numbers [1], [2], and/or [3] in the [options] position, any
  237.    one (or more) of these columns can be suppressed.
  238.  
  239.  
  240.    cp sendingfile receivingfile
  241.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  242.    The [cp] command copies a file. [sendingfile] is the file to be
  243.    copied, [receivingfile] is the file to which it is copied.
  244.  
  245.  
  246.    diff [options] filename1 filename2
  247.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  248.    Again, a file comparison utility. However, with [diff], the 
  249.    differences are displayed as instructions that can be used
  250.    to edit the files so that they are identical.
  251.  
  252.  
  253.    diff3 filename1 filename2 filename3
  254.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  255.    Similar to [diff], [diff3] is unique in that it can compare
  256.    three files. Gee.
  257.  
  258.  
  259.    ed filename
  260.    ~~~~~~~~~~~
  261.    One of the UNIX's three editing utilities, [ed] is a basic line
  262.    editor. I'm sure there are other files that will explain how
  263.    to use [ed]. Thus, I'll confine myself to a rough outline:
  264.    e filename ........... edit a different file
  265.    f filename ........... changes the currently specified file.
  266.    h .................... provides explanation of errors.
  267.    I
  268.    text ................. inserts text before the current line.
  269.    line,linel ........... lists the specified lines.
  270.    line,linen ........... displays specified lines, preceded by
  271.                           their line numbers.
  272.    q .................... exit from [ed]
  273.    w .................... writes buffer to current filename.
  274.    + or - ............... +number of lines closer to end
  275.                           -number of lines closer to beginning.
  276.  
  277.  
  278.    expr formula
  279.    ~~~~~~~~~~~~
  280.    Utility which evaluates an expression.
  281.  
  282.  
  283.    find directory searchcriteria parameter actioncriteria parameter
  284.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  285.    The [find] utility can be very useful indeed, especially when
  286.    confronted by a UNIX with countless files. Basically, this 
  287.    command finds files which meet certain criteria, and then
  288.    performs an operation (such as printing the files). Search
  289.    criteria consists of the following:
  290.  
  291.  
  292.    Criteria     Parameter       Description
  293.    ~~~~~~~~     ~~~~~~~~~       ~~~~~~~~~~~
  294.    -name       filename        Files whose names match [filename]
  295.                                will meet this criteria.
  296.    -type       filetype        Files whose type matches that specified
  297.             [b] block special                      will meet criteria.
  298.             [c] character spec. file
  299.             [d] directory file
  300.             [f] plain file
  301.    -links      +/- x           Files with # of links indicated by
  302.                                + or - x meet this criteria.
  303.    -user       login name      Files belonging to user with given
  304.             or user ID #       login name or ID # meet criteria.
  305.    -group      group name      Files belonging to group with given
  306.             or group ID #      group name or ID # meet this criteria.
  307.    -size       + or - x        Files greater than +x bytes or less
  308.                                than -x bytes meet this criteria.
  309.    -atime      + or - x        Files not accessed within +x days,
  310.                                accessed within -x days, or acc-
  311.                                essed x days ago meet criteria.
  312.    -mtime      + or - x        Files NOT modified within +x days,
  313.                                modified within -x days, or modified
  314.                                x days ago will meet this criteria.
  315.    -newer      filename        Files modified more recently than
  316.                                [filename] meet this criteria.
  317.   Action Criteria   "                    "
  318.   ~~~~~~~~~~~~~~~   ~                    ~
  319.    -print           -          When search criteria are met, path
  320.                                name of the file is displayed.
  321.    -exec       command{ }\;    Executes given command when search
  322.                                criteria are met. { } indicates file-
  323.                                name, [\;] ends the command.
  324.    -ok         command{ }\;    Exactly like -exec, except user is
  325.                                prompted [y] or [n] before command.
  326.  
  327.  
  328.    grep -options searchstring filenames
  329.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  330.    Another search command, this for a particular string of chars.
  331.  
  332.  
  333.    ln original new
  334.    ~~~~~~~~~~~~~~~
  335.    [ln] establishes a file link. For this utility, [original] repre-
  336.    sents the filename to be linked, [new] the filename of the new
  337.    link to the original.
  338.  
  339.  
  340.    [ls] provides directory information.  [ls -l/] displays a more
  341.    complete version of the info. list.
  342.  
  343.  
  344.    mail username username
  345.    ~~~~~~~~~~~~~~~~~~~~~~
  346.    This utility allows e-mail to be sent to other system users. 
  347.  
  348.    mail
  349.    ~~~~
  350.    Simply typing [mail] checks the user's own mailbox.
  351.    When sending mail, several items must be set:
  352.    ~s text ............ sets the subject field
  353.    ~c user names ...... sends other users carbon copies of mail
  354.    m user names ....... activates the compose mode, with the
  355.                         specified users as the message's recipients.
  356.    ~h ................. displays and allows editing of all headers.
  357.    ^D ................. ends message editing; sends mail.
  358.    ~r filename ........ places file in body of message (keen command)
  359.  
  360.    Reading One's Own Mail:
  361.    h number or range ....... causes specified headers to be displayed
  362.    p message # ............. displays entire message
  363.    d number or range ....... deletes specified messages
  364.    u number or range ....... undelete specified mail during SAME
  365.                              mail session (messages removed after q)
  366.    q ....................... leave the post office
  367.  
  368.  
  369.    mkdir directoryname
  370.    ~~~~~~~~~~~~~~~~~~~
  371.    [mkdir] allows creation of a subdirectory, for your dining 
  372.    enjoyment.
  373.  
  374.  
  375.    more filename
  376.    ~~~~~~~~~~~~~
  377.    For longer files, [more] is a convenient utility. It will display
  378.    the first screen of file data and then stop, allowing the user 
  379.    to control scrolling henceforth.
  380.  
  381.  
  382.    mv oldfilename newfilename
  383.    ~~~~~~~~~~~~~~~~~~~~~~~~~~
  384.    The [mv] utility can be used simply to rename a file, or...
  385.  
  386.  
  387.    mv filea fileb... directory
  388.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  389.    [mv] can also be used to move files to a new directory, provided
  390.    the directory exists, and you have write access to it.
  391.  
  392.  
  393.    ps -options
  394.    ~~~~~~~~~~~
  395.    The [ps] command, by itself, displays the status of each active
  396.    process controlled by your terminal. This status report includes
  397.    the Process Identification Number (PID), the terminal (TTY), the
  398.    time the process has been executing (TIME), and the command line
  399.    used to execute the process (CMD).
  400.    [ps]'s three options include -a (displays info. on active processes
  401.    controlled by any terminal), -x (info. on ALL active processes), and
  402.    -l (an extensive status report on all active processes).
  403.  
  404.  
  405.    pwd
  406.    ~~~
  407.    [pwd] command displays the present working directory.
  408.  
  409.  
  410.    rm filename
  411.    ~~~~~~~~~~~
  412.    [rm] removes a file. More than one file can be specified.
  413.  
  414.  
  415.    rmdir directoryname
  416.    ~~~~~~~~~~~~~~~~~~~
  417.    This utility removes a directory, an EMPTY directory (save the
  418.    hidden files). 
  419.  
  420.  
  421.    sleep seconds
  422.    ~~~~~~~~~~~~~
  423.    The [sleep] utility causes a process to become inactive for a
  424.    certain period of time. Max. seconds is 65,536 (about 18 hrs).
  425.  
  426.  
  427.    sort -options filenames
  428.    ~~~~~~~~~~~~~~~~~~~~~~~
  429.    [sort] merges and sorts files. Without options, [sort] orders
  430.    files by the ASCII codes of the characters at the beginning
  431.    of each line. Options include -b (leading blanks ignored), -d
  432.    (only letters, digs, and blanks considered; "dictionary sort"),
  433.    -f (case ignored), -n (numerical sort [for numerical data]), and
  434.    -r (a reverse sort).
  435.  
  436.  
  437.    split -size original resulting
  438.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  439.    [split] divides a large file into smaller ones. [size] refers to
  440.    the number of lines the resulting files contain, [original] is
  441.    the name of the orig. file, and [resulting] represents the 
  442.    prefix name assigned to the newly created files.
  443.  
  444.  
  445.    umask ugo
  446.    ~~~~~~~~~
  447.    [umask] changes the file CREATION mask (see [chmod] for already
  448.    existing files). Here, [u] represents the owner's access 
  449.    permission, [g] the group's a.p., and [o] the a.p. for all others.
  450.  
  451.  
  452.    [uucp] (UNIX to UNIX copy) can be used to send files to a 
  453.    remote UNIX, or retrieve files from the remote system.
  454.    Other UNIX comm commands include [cu] (which establishes contact
  455.    with another system), and [uux] (UNIX to UNIX execute; allows
  456.    commands to be executed on a remote system).
  457.  
  458.  
  459.    wc -options filenames
  460.    ~~~~~~~~~~~~~~~~~~~~~
  461.    The [wc] utility displays file-size information. This includes
  462.    the number of lines, words, and characters. By chosing the
  463.    -l, -w, or -c options, the information can be limited to only
  464.    line, word, or character number.
  465.  
  466.  
  467.    who
  468.    ~~~
  469.    A very useful command (which some systems respond to even before 
  470.    a user is actually logged on), [who] displays a list of users
  471.    currently online. This list includes the user's name, terminal
  472.    device # (tty), and the log-in time.  [who am i] displays info.
  473.    only on the user who executed the command.
  474.  
  475.  
  476. _______________________________________________________________________________
  477. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  478.    Alright. You may have noticed that this isn't EXACTLY a Bible. I
  479.    took the liberty of omitting some of the command explanations.
  480.    But, if anyone REALLY wants to know more about [vi], or [stty],
  481.    or (perhaps more justifiably) have a more comprehensive guide
  482.    to the mail system, I'll be glad to write some 'by request'
  483.                          text files.
  484. _______________________________________________________________________________
  485. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  486.  (c)1987  cDc communications  by Franken Gibe                         0/0/87-14
  487.  All Rights Smeared Across The Wall
  488. 
  489.  
  490.